3.114 \(\int \frac{x (a+b \tan ^{-1}(c x))^2}{(d+i c d x)^3} \, dx\)

Optimal. Leaf size=178 \[ \frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (-c x+i)}-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (-c x+i)^2}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}-\frac{5 i b^2}{16 c^2 d^3 (-c x+i)}-\frac{b^2}{16 c^2 d^3 (-c x+i)^2}+\frac{5 i b^2 \tan ^{-1}(c x)}{16 c^2 d^3} \]

[Out]

-b^2/(16*c^2*d^3*(I - c*x)^2) - (((5*I)/16)*b^2)/(c^2*d^3*(I - c*x)) + (((5*I)/16)*b^2*ArcTan[c*x])/(c^2*d^3)
- ((I/4)*b*(a + b*ArcTan[c*x]))/(c^2*d^3*(I - c*x)^2) + (3*b*(a + b*ArcTan[c*x]))/(4*c^2*d^3*(I - c*x)) + (a +
 b*ArcTan[c*x])^2/(8*c^2*d^3) + (x^2*(a + b*ArcTan[c*x])^2)/(2*d^3*(1 + I*c*x)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.216778, antiderivative size = 178, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {37, 4874, 4862, 627, 44, 203, 4884} \[ \frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (-c x+i)}-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (-c x+i)^2}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}-\frac{5 i b^2}{16 c^2 d^3 (-c x+i)}-\frac{b^2}{16 c^2 d^3 (-c x+i)^2}+\frac{5 i b^2 \tan ^{-1}(c x)}{16 c^2 d^3} \]

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*ArcTan[c*x])^2)/(d + I*c*d*x)^3,x]

[Out]

-b^2/(16*c^2*d^3*(I - c*x)^2) - (((5*I)/16)*b^2)/(c^2*d^3*(I - c*x)) + (((5*I)/16)*b^2*ArcTan[c*x])/(c^2*d^3)
- ((I/4)*b*(a + b*ArcTan[c*x]))/(c^2*d^3*(I - c*x)^2) + (3*b*(a + b*ArcTan[c*x]))/(4*c^2*d^3*(I - c*x)) + (a +
 b*ArcTan[c*x])^2/(8*c^2*d^3) + (x^2*(a + b*ArcTan[c*x])^2)/(2*d^3*(1 + I*c*x)^2)

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 4874

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_), x_Symbol] :> With[{u
 = IntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[(a + b*ArcTan[c*x])^p, u, x] - Dist[b*c*p, Int[ExpandIntegrand[(a +
b*ArcTan[c*x])^(p - 1), u/(1 + c^2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && IGtQ[p, 1] && EqQ[c
^2*d^2 + e^2, 0] && IntegersQ[m, q] && NeQ[m, -1] && NeQ[q, -1] && ILtQ[m + q + 1, 0] && LtQ[m*q, 0]

Rule 4862

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b*
ArcTan[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 627

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c*x)/e)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{x \left (a+b \tan ^{-1}(c x)\right )^2}{(d+i c d x)^3} \, dx &=\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}-(2 b c) \int \left (-\frac{i \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (-i+c x)^3}-\frac{3 \left (a+b \tan ^{-1}(c x)\right )}{8 c^2 d^3 (-i+c x)^2}-\frac{a+b \tan ^{-1}(c x)}{8 c^2 d^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}+\frac{(i b) \int \frac{a+b \tan ^{-1}(c x)}{(-i+c x)^3} \, dx}{2 c d^3}+\frac{b \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{4 c d^3}+\frac{(3 b) \int \frac{a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{4 c d^3}\\ &=-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)^2}+\frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \frac{1}{(-i+c x)^2 \left (1+c^2 x^2\right )} \, dx}{4 c d^3}+\frac{\left (3 b^2\right ) \int \frac{1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{4 c d^3}\\ &=-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)^2}+\frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \frac{1}{(-i+c x)^3 (i+c x)} \, dx}{4 c d^3}+\frac{\left (3 b^2\right ) \int \frac{1}{(-i+c x)^2 (i+c x)} \, dx}{4 c d^3}\\ &=-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)^2}+\frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}+\frac{\left (i b^2\right ) \int \left (-\frac{i}{2 (-i+c x)^3}+\frac{1}{4 (-i+c x)^2}-\frac{1}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{4 c d^3}+\frac{\left (3 b^2\right ) \int \left (-\frac{i}{2 (-i+c x)^2}+\frac{i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{4 c d^3}\\ &=-\frac{b^2}{16 c^2 d^3 (i-c x)^2}-\frac{5 i b^2}{16 c^2 d^3 (i-c x)}-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)^2}+\frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}-\frac{\left (i b^2\right ) \int \frac{1}{1+c^2 x^2} \, dx}{16 c d^3}+\frac{\left (3 i b^2\right ) \int \frac{1}{1+c^2 x^2} \, dx}{8 c d^3}\\ &=-\frac{b^2}{16 c^2 d^3 (i-c x)^2}-\frac{5 i b^2}{16 c^2 d^3 (i-c x)}+\frac{5 i b^2 \tan ^{-1}(c x)}{16 c^2 d^3}-\frac{i b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)^2}+\frac{3 b \left (a+b \tan ^{-1}(c x)\right )}{4 c^2 d^3 (i-c x)}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{8 c^2 d^3}+\frac{x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 d^3 (1+i c x)^2}\\ \end{align*}

Mathematica [A]  time = 0.367463, size = 117, normalized size = 0.66 \[ \frac{a^2 (-8-16 i c x)+4 a b (-3 c x+2 i)+b (c x+i) \tan ^{-1}(c x) (a (-12 c x+4 i)+b (3+5 i c x))-2 b^2 \left (3 c^2 x^2+2 i c x+1\right ) \tan ^{-1}(c x)^2+b^2 (4+5 i c x)}{16 c^2 d^3 (c x-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*ArcTan[c*x])^2)/(d + I*c*d*x)^3,x]

[Out]

(4*a*b*(2*I - 3*c*x) + b^2*(4 + (5*I)*c*x) + a^2*(-8 - (16*I)*c*x) + b*(I + c*x)*(a*(4*I - 12*c*x) + b*(3 + (5
*I)*c*x))*ArcTan[c*x] - 2*b^2*(1 + (2*I)*c*x + 3*c^2*x^2)*ArcTan[c*x]^2)/(16*c^2*d^3*(-I + c*x)^2)

________________________________________________________________________________________

Maple [B]  time = 0.084, size = 464, normalized size = 2.6 \begin{align*}{\frac{-i{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{{c}^{2}{d}^{3} \left ( cx-i \right ) }}+{\frac{{a}^{2}}{2\,{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{i{a}^{2}}{{c}^{2}{d}^{3} \left ( cx-i \right ) }}+{\frac{{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{2\,{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{{\frac{i}{4}}ab}{{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}+{\frac{{\frac{5\,i}{16}}{b}^{2}\arctan \left ( cx \right ) }{{c}^{2}{d}^{3}}}-{\frac{3\,{b}^{2}\arctan \left ( cx \right ) }{4\,{c}^{2}{d}^{3} \left ( cx-i \right ) }}+{\frac{{\frac{3\,i}{8}}{b}^{2}\arctan \left ( cx \right ) \ln \left ( cx-i \right ) }{{c}^{2}{d}^{3}}}-{\frac{{\frac{3\,i}{8}}{b}^{2}\arctan \left ( cx \right ) \ln \left ( cx+i \right ) }{{c}^{2}{d}^{3}}}-{\frac{{b}^{2}}{16\,{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{2\,iab\arctan \left ( cx \right ) }{{c}^{2}{d}^{3} \left ( cx-i \right ) }}+{\frac{3\,{b}^{2}\ln \left ( cx-i \right ) \ln \left ( -i/2 \left ( cx+i \right ) \right ) }{16\,{c}^{2}{d}^{3}}}-{\frac{3\,{b}^{2} \left ( \ln \left ( cx-i \right ) \right ) ^{2}}{32\,{c}^{2}{d}^{3}}}-{\frac{3\,{b}^{2}\ln \left ( -i/2 \left ( -cx+i \right ) \right ) \ln \left ( -i/2 \left ( cx+i \right ) \right ) }{16\,{c}^{2}{d}^{3}}}+{\frac{3\,{b}^{2}\ln \left ( -i/2 \left ( -cx+i \right ) \right ) \ln \left ( cx+i \right ) }{16\,{c}^{2}{d}^{3}}}-{\frac{3\,{b}^{2} \left ( \ln \left ( cx+i \right ) \right ) ^{2}}{32\,{c}^{2}{d}^{3}}}+{\frac{{\frac{5\,i}{16}}{b}^{2}}{{c}^{2}{d}^{3} \left ( cx-i \right ) }}+{\frac{ab\arctan \left ( cx \right ) }{{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{{\frac{i}{4}}{b}^{2}\arctan \left ( cx \right ) }{{c}^{2}{d}^{3} \left ( cx-i \right ) ^{2}}}-{\frac{3\,ab\arctan \left ( cx \right ) }{4\,{c}^{2}{d}^{3}}}-{\frac{3\,ab}{4\,{c}^{2}{d}^{3} \left ( cx-i \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x)

[Out]

-I/c^2*b^2/d^3*arctan(c*x)^2/(c*x-I)+1/2/c^2*a^2/d^3/(c*x-I)^2-I/c^2*a^2/d^3/(c*x-I)+1/2/c^2*b^2/d^3*arctan(c*
x)^2/(c*x-I)^2-1/4*I/c^2*a*b/d^3/(c*x-I)^2+5/16*I*b^2*arctan(c*x)/c^2/d^3-3/4/c^2*b^2/d^3*arctan(c*x)/(c*x-I)+
3/8*I/c^2*b^2/d^3*arctan(c*x)*ln(c*x-I)-3/8*I/c^2*b^2/d^3*arctan(c*x)*ln(c*x+I)-1/16/c^2*b^2/d^3/(c*x-I)^2-2*I
/c^2*a*b/d^3*arctan(c*x)/(c*x-I)+3/16/c^2*b^2/d^3*ln(c*x-I)*ln(-1/2*I*(c*x+I))-3/32/c^2*b^2/d^3*ln(c*x-I)^2-3/
16/c^2*b^2/d^3*ln(-1/2*I*(-c*x+I))*ln(-1/2*I*(c*x+I))+3/16/c^2*b^2/d^3*ln(-1/2*I*(-c*x+I))*ln(c*x+I)-3/32/c^2*
b^2/d^3*ln(c*x+I)^2+5/16*I/c^2*b^2/d^3/(c*x-I)+1/c^2*a*b/d^3*arctan(c*x)/(c*x-I)^2-1/4*I/c^2*b^2/d^3*arctan(c*
x)/(c*x-I)^2-3/4/c^2*a*b/d^3*arctan(c*x)-3/4/c^2*a*b/d^3/(c*x-I)

________________________________________________________________________________________

Maxima [A]  time = 1.20614, size = 192, normalized size = 1.08 \begin{align*} -\frac{{\left (16 i \, a^{2} + 12 \, a b - 5 i \, b^{2}\right )} c x + 2 \,{\left (3 \, b^{2} c^{2} x^{2} + 2 i \, b^{2} c x + b^{2}\right )} \arctan \left (c x\right )^{2} + 8 \, a^{2} - 8 i \, a b - 4 \, b^{2} +{\left ({\left (12 \, a b - 5 i \, b^{2}\right )} c^{2} x^{2} - 2 \,{\left (-4 i \, a b - b^{2}\right )} c x + 4 \, a b - 3 i \, b^{2}\right )} \arctan \left (c x\right )}{16 \, c^{4} d^{3} x^{2} - 32 i \, c^{3} d^{3} x - 16 \, c^{2} d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="maxima")

[Out]

-((16*I*a^2 + 12*a*b - 5*I*b^2)*c*x + 2*(3*b^2*c^2*x^2 + 2*I*b^2*c*x + b^2)*arctan(c*x)^2 + 8*a^2 - 8*I*a*b -
4*b^2 + ((12*a*b - 5*I*b^2)*c^2*x^2 - 2*(-4*I*a*b - b^2)*c*x + 4*a*b - 3*I*b^2)*arctan(c*x))/(16*c^4*d^3*x^2 -
 32*I*c^3*d^3*x - 16*c^2*d^3)

________________________________________________________________________________________

Fricas [A]  time = 2.31147, size = 378, normalized size = 2.12 \begin{align*} \frac{{\left (-32 i \, a^{2} - 24 \, a b + 10 i \, b^{2}\right )} c x +{\left (3 \, b^{2} c^{2} x^{2} + 2 i \, b^{2} c x + b^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )^{2} - 16 \, a^{2} + 16 i \, a b + 8 \, b^{2} +{\left ({\left (-12 i \, a b - 5 \, b^{2}\right )} c^{2} x^{2} + 2 \,{\left (4 \, a b - i \, b^{2}\right )} c x - 4 i \, a b - 3 \, b^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{32 \, c^{4} d^{3} x^{2} - 64 i \, c^{3} d^{3} x - 32 \, c^{2} d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="fricas")

[Out]

((-32*I*a^2 - 24*a*b + 10*I*b^2)*c*x + (3*b^2*c^2*x^2 + 2*I*b^2*c*x + b^2)*log(-(c*x + I)/(c*x - I))^2 - 16*a^
2 + 16*I*a*b + 8*b^2 + ((-12*I*a*b - 5*b^2)*c^2*x^2 + 2*(4*a*b - I*b^2)*c*x - 4*I*a*b - 3*b^2)*log(-(c*x + I)/
(c*x - I)))/(32*c^4*d^3*x^2 - 64*I*c^3*d^3*x - 32*c^2*d^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c*x))**2/(d+I*c*d*x)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x\right ) + a\right )}^{2} x}{{\left (i \, c d x + d\right )}^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(d+I*c*d*x)^3,x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)^2*x/(I*c*d*x + d)^3, x)